Document <accelerator> element
authorJohan Dahlin <jdahlin@async.com.br>
Mon, 9 Jul 2007 13:41:13 +0000 (13:41 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 9 Jul 2007 13:41:13 +0000 (13:41 +0000)
2007-07-09  Johan Dahlin <jdahlin@async.com.br>

       * gtk/tmpl/gtkactiongroup.sgml: Document <accelerator> element

svn path=/trunk/; revision=18409

docs/reference/ChangeLog
docs/reference/gtk/tmpl/gtkactiongroup.sgml

index 46642aebe1de13a3d9f864c92f5ab5570b127815..453adcbc56b2959922f5f6e765e9c8b67fbbb5bc 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-09  Johan Dahlin,,,  <jdahlin@lozenge>
+
+       * gtk/tmpl/gtkactiongroup.sgml: Document <accelerator> element
+
 Mon Jul  9 10:32:39 2007  Tim Janik  <timj@imendio.com>
 
        * gdk/tmpl/threads.sgml: applied docu clarification patch from Bjoern
index bed93558aa70973e7389705a7c340d55dff2ef86..516210d427801d79cafb383297f345df96edaa9c 100644 (file)
@@ -38,6 +38,28 @@ GtkAction objects as &lt;child&gt; elements in UI definitions.
 Note that it is probably more common to define actions and action groups
 in the code, since they are directly related to what the code can do.
 </para>
+<para>
+The GtkActionGroup implementation of the GtkBuildable interface supports a 
+custom &lt;accelerator&gt; element, which has attributes named key and
+modifiers and allows to specify accelerators. This is similar to the 
+&lt;accelerator&gt; element of GtkWidget, the main difference is that 
+it doesn't allow you to specify a signal.
+</para>
+<example>
+<title>A <structname>GtkDialog</structname> UI definition fragment.</title>
+<programlisting><![CDATA[
+<object class="GtkActionGroup" id="actiongroup">
+  <child>
+      <object class="GtkAction" id="About">
+          <property name="name">About</property>
+          <property name="stock_id">gtk-about</property>
+          <signal handler="about_activate" name="activate"/>
+      </object>
+      <accelerator key="F1" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK"/>
+  </child>
+</object>
+]]></programlisting>
+</example>
 </refsect2>
 
 <!-- ##### SECTION See_Also ##### -->